<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JS review</title>
</head>
<body>
<script type="text/javascript">
    // 在js中定义一个类.
    function User (username,password){
        this.username = username;
        this.passwrod = password;
        // 实例方法:
        this.doSome = function (){
            alert("doSome method execute!~");
        }
        // 静态方法
        USer.doOther = function (){
            alert("doOther method execute!~");
        }
    }
</script>


</body>
</html>